package de.core.gameplay.level;

import java.awt.geom.Point2D;
import java.util.List;

import de.core.gameplay.Updateable;
import de.core.gameplay.actor.AbstractActor;
import de.core.graphics.Renderable;

public interface Level extends Renderable, Updateable {

    /**
     * Adds the passed {@link AbstractActor} to the {@link Level}.
     */
    void addActor(AbstractActor aActor);

    /**
     * Removes the passed {@link AbstractActor} from the {@link Level}.
     */
    void removeActor(AbstractActor aActor);

    /**
     * Returns all {@link AbstractActor}'s in the {@link Level}.
     */
    List<AbstractActor> getActors();

    /**
     * Returns the width of the {@link Level}.
     */
    int getWidth();

    /**
     * Returns the height of the {@link Level}.
     */
    int getHeight();

    /**
     * Returns all Actors that are currently on the passed location.
     * A Actor is on the passed location if its Image overlays this location.
     */
    List<AbstractActor> getActorsAt(int aX, int aY);

    /**
     * Returns all Actors that are currently on the passed {@link Paint2D}.
     * A Actor is on the passed point if its Image overlays this Point.
     */
    List<AbstractActor> getActorsAt(Point2D aPoint);

    /**
     * Returns all Actors that are currently on the passed {@link Paint2D}.
     * A Actor is on the passed point if its Image overlays this Point.
     * Only Actors that extend aClass will be returned.
     */
    <_Class extends AbstractActor> List<_Class> getActorsAt(Point2D aPoint, Class<_Class> aClass);

    /**
     * Returns a list of Actors which intersect with the image of the passed Actor.
     */
    List<AbstractActor> getActorsIntercectingWith(AbstractActor aActor);

    /**
     * Returns a list of Actors which intersect with the image of the passed Actor.
     * Only Actors that extend aClass will be returned.
     */
    <_Class extends AbstractActor> List<_Class> getActorsIntercectingWith(AbstractActor aActor, Class<_Class> aClass);
}
